<%@ page contentType="text/html; charset=UTF-8" %>

<%@ taglib uri="/WEB-INF/tlds/struts-html.tld"  prefix="html" %>
<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld"  prefix="bean" %>
<%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/tlds/custom-html.tld" prefix="chtml" %>

<%@ page import="com.erp.app.report.genericInquiry.inquiryMaster.beans.*" %>
<%@ page import="com.erp.app.report.genericInquiry.inquiryDisplay.beans.vo.*" %>
<%@ page import="java.util.Collection" %>
<%@ page import="com.erp.app.report.genericInquiry.*" %>
<%@ page import="com.erp.app.common.ProjectConstants" %>
<%@ page import="com.erp.framework.pagination.PageControl" %>

<jsp:useBean id="genericInquirySearchForm" scope="session" type="GenericInquirySearchForm" />
<%	String isScrollToDisabled = genericInquirySearchForm.getTotalPage() == 1 ? "disabled" : "";
	String isScrollLeftDisabled = genericInquirySearchForm.isFirstPage() ? "disabled" : "";
	String isScrollRightDisabled = genericInquirySearchForm.isLastPage() ? "disabled" : "";
	int noPageDigits = String.valueOf(genericInquirySearchForm.getTotalPage()).length();
	String style = "width:" + (noPageDigits + 1) + "em";

	if ( genericInquirySearchForm.getTotalPage() == 0 ) { %>
			&nbsp;
<%	} else { %>
	<span class="grid_page">
	<input type="button" value="Go" class="button1" onclick="javascript:doSubmit('scrollTo');" <%=isScrollToDisabled%>>&nbsp;
	Page <input type="text" name="scrollTo" class="textbox1" style="<%=style%>" maxlength="<%=String.valueOf(noPageDigits)%>" value="<%=String.valueOf(genericInquirySearchForm.getCurrentPage())%>" <%=isScrollToDisabled%>> of <%=genericInquirySearchForm.getTotalPage()%>
	<input type="button" value="|&lt;&lt;" class="button1" onclick="javascript:doSubmit('scrollToFirstPage');" <%=isScrollLeftDisabled%>>
	<input type="button" value="&lt;&lt;" class="button1" onClick="javascript:doSubmit('scrollLeft');" <%=isScrollLeftDisabled%>>
	<input type="button" value="&gt;&gt;" class="button1" onClick="javascript:doSubmit('scrollRight');" <%=isScrollRightDisabled%>>
	<input type="button" value="&gt;&gt;|" class="button1" onclick="javascript:doSubmit('scrollToLastPage');" <%=isScrollRightDisabled%>>
	</span>
<%	} %>